import commonStore from "$store/admin/common"
import { eventBus } from "$common/admin/utils"

export let pageDidMount = function () {
    return function(target, name, descriptor){
        let fn = descriptor.value;
        descriptor.value = function () {
              setTimeout(()=>{
                commonStore.LoadingBarState = false;
              },300);
            return fn.apply(this,arguments)
        }
    }
};

window.addEventListener("hashchange",function () {
    eventBus.trigger("router-change")
});
